#include<iostream>
#include<algorithm>
#include<cstring>
using namespace std;
const int N = 1010;	
int g[N][N];
int	m, s, d;
int want[N], link[N];
bool st[N];
int dis[N];
void dij(int s ,int n)
{
	memset(dis, 0x3f, sizeof(dis));
	memset(st, 0, sizeof(st));
	dis[s] = 0;
	for (int i = 0; i < n; i++) {
		int t = -1;
		for (int j = 1; j <= n; j++) {
			if (!st[j] && (t == -1 || dis[j] < dis[t])) {
				t = j;
			}
		}
		st[t] = 1;
		for (int j = 1; j <= n; j++) {
			dis[j] = min(dis[j], dis[t] + g[t][j]);
		}
	}
}
int main()
{
	while (cin >> m >> s >> d) {
		memset(g, 0x3f, sizeof(g));
		int a, b, c;
		int ma = 0;
		while (m--) {
			cin >> a >> b >> c;
			g[a][b] = g[b][a] = min(g[a][b], c);
			ma = max(ma, max(a, b));
		}
		for (int i = 0; i < s; i++) {
			cin >> link[i];
		}
		for (int i = 0; i < d; i++) {
			cin >> want[i];
		}
		int ans = 0x3f3f3f3f;
		for (int i = 0; i < s; i++) {
			dij(link[i], ma);
			for (int j = 0; j < d; j++) {
				ans = min(ans, dis[want[j]]);
			}
		}
		cout << ans << endl;
	}
	return 0;
}